package ch2.el.profile;


import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;

@Configuration
public class ProfileConfig {
    /**
     * 开发环境
     * @return
     */
    @Bean
    @Profile("dev")
    public DemoBean devDemoBean(){
        return new DemoBean("from development profile");
    }

    /**
     * 生成环境
     * @return
     */
    @Bean
    @Profile("prod")
    public DemoBean prodDemoBen(){
        return new DemoBean("from prodution profile");
    }
}
